<h2>Generate Spec</h2>
<p>
	Based on the parameters you entered, the following spec.in file has been generated
</p>
<br/>
<pre>
<?php echo "RUNTIME " . $data['Project']['RUNTIME'] . "\nPROGTYPE " . $data['Project']['PROGTYPE'] . "\n"; ?>
<?php echo "LOCMIN " . $data['Project']['LOCMIN'] . "\nLOCMAX " . $data['Project']['LOCMAX'] . "\nLOCSTEP " . $data['Project']['LOCSTEP'] . "\n"; ?>
<?php 
$kernelCount = 0;
//Count number of kernels with weights set
foreach ($data['Project'] as $key => $value) {
	if(preg_match("/^C([0-9])+/", $key)) {
		if($value) {
			$kernelCount++;
		}
	}
}
echo $kernelCount . "\n";
//print kernels to spec.in
foreach ($data['Project'] as $key => $value) {
	if(preg_match("/^C([0-9])+/", $key)) {
		if($value) {
			echo $key . " " . $value . "\n";
		}
	}
}
?>
</pre>
<br/>
The file will be as input for command line arguments for the BM2 engine